from tkinter import *
from tkinter.filedialog import askdirectory
tiw = Tk()
tiw.title("请输入文件夹名称：")
tiw.geometry('300x50')

en = Entry(tiw, show=None)
Label(tiw, text="请输入文件夹名称:")
en.pack()

path ="E:/Renwu/20220411APP/登陆界面设计"

def app():
    et = en.get()
    tiw.destroy()

    mkpath = path + "/" + et

    def return_path(path):
        import os
        path = path.strip()

        Exist = os.path.exists(path)

        if not Exist:

            os.makedirs(path)

            print(path + ' 创建成功')
            return True
        else:
            print(path + ' 目录已存在')
            return False


    return_path(mkpath)

btn = Button(tiw, text="OK", width=10, height=2, command=app)
btn.pack()

tiw.mainloop()